1. Field of the Invention
The present invention generally relates to a prediction-coding device for prediction-coding an image using a motion vector and more particularly relates to a method of determining the vector search region of a motion vector detection device for use in a prediction-coding device, etc.
2. Background of the Related Art
Recently, in the storage apparatuses of various kinds of optical disks such as a digital TV, a DVD, etc., the moving picture distribution on the Internet, the moving picture accumulation of a digital camera, etc., an MPEG (abbreviation of Moving Picture Experts Group that includes MPEG-1/MPEG-2/MPEG-4, etc.) that is standardized by ISO/IEC (International Eelectrotechnical Standardization Commission of International Standardization Organization) or H.261, H.262 and H264 that are standardized by ITU-T (Telecommunications Standardization Sector of International Telecommunication Union) are frequently adopted as compression coding methods of moving picture information.
In these coding methods, an information amount is compressed using the characteristic of a moving picture such that a correlation between frames that are continuous in terms of time is high. In order to obtain such a high correlation, motion vector detection between a coding frame and a reference frame that is present before or after the coding frame in terms of time is performed for each processing unit (referred to as as a macroblock and abbreviated to MB) of the coding frame.
In this method, the necessity for low consumption of electric power of a circuit increases as the above-mentioned coding apparatus becomes miniaturized and portable while the improvement of movement coding efficiency and the image quality of a coding movement image are required. Therefore, the simultaneous pursuit of these requirements becomes a problem.
Especially, the detection of a motion vector requires the largest processing computation amount among coding processings. Furthermore, the degree of the detection accuracy greatly influences both coding efficiency and image quality. Therefore, the present invention relates to the detection technology of a motion vector.
A motion vector is detected by performing a correlation estimation value computation between an original image MB and the data in a reference image region and by comparing the thus-obtained correlation estimation values. The correlation estimation value shows how many errors occur between the pixel data of an original image MB and the pixel data that is extracted in the form of an MB from a reference image region. A difference absolute value cumulative sum or a difference square cumulative sum, etc. are used as a correlation estimation value. The correlation estimation value is shifted for each pixel in the reference image as shown in FIG. 19 and the position in the reference image where the correlation estimation value becomes a minimum value is obtained as a motion vector.
In this case, it is a problem in which order is the most efficient order to search for the reference image in one frame. Namely, in a method of horizontally moving an original image MB for each pixel from one of the four corners of a reference image and vertically moving the MB for each pixel row, the correlation between frames is not considered at all so that this method is extremely inefficient. Generally it is thought that the movement of an image between adjacent frames is small. Therefore, a comparatively small region around the center of a reference image whose position corresponds to the position of an original image MB is searched. In the case where a block that the two images sufficiently agree with each other is not detected, the search region is expanded and a search operation is performed. In this case, the problem is how to expand a search region.
Furthermore, how to effectively detect a motion vector depends on how effectively a reference image data is inputted into a correlation estimation value computation device and how effectively the loss of a computation time is decreased, in this estimation value computation.
The applicant has already disclosed a technology of improving the responsiveness of this computation as an “image correlation apparatus” (refer to patent article 1). In this patent article 1, memory access and computation can be efficiently performed if a reference image region (search window) for performing a vector search for the square processing unit of an original image is a fixed square region.
FIG. 20 is a block diagram showing the configuration of an image correlation device (namely, motion vector detection device) of the patent article 1. In FIG. 20, a conventional image correlation device 1 comprises a frame memory 10 storing a plurality of frames including an original image and a reference image, an original image MB storage 12 storing an original image MB obtained from the frame memory 10, a reference image region storage 14 storing the reference image search region obtained from the frame memory 10, an original image delay adjuster 16 that delays, timing-adjusts and outputs an original image MB from the original image MB storage 12, a unit data timing adjuster 18 that timing-adjusts and outputs a reference image region from the reference image region storage 14 and a motion vector comparator 20 that simultaneously performs correlation estimation value computation of n images (the number of horizontal pixels of search region of reference image) on the basis of the image data outputted from the original image delay adjuster 16 and the unit data timing adjuster 18 and that detects a motion vector. For example, a reference image data read out from the reference image region storage 14 is timing-adjusted for the original image MB data and the reference image region of FIG. 19 using the unit data timing adjuster 18. Subsequently, the thus-adjusted data is inputted into n computation devices (correlation units), thereby simultaneously performing the computation of n horizontal vectors. Then, each computation device repeats this computation processing m times in a vertical vector search direction, thereby realizing the motion vector estimation value computation in the search region of horizontal n vectors×vertical m vectors without causing any computation loss time.
If the search region of a motion vector is expanded from n×m vectors to N×M vectors (N>n, M>m) in order to increase the detection accuracy of a vector, the circuit scale or the computation processing time becomes (N×M)/(n×m) times.
FIG. 21 shows one example of a conventional search region expansion method. Like FIG. 21, if N=4*n and M=3*m are set and the search region is expanded four times in a horizontal direction and three times in a vertical direction, the computation processing amount becomes 12 (4*3) times. In this case, if a processing is performed using the same circuit configuration as that of the above-mentioned patent article 1, the circuit scale becomes four times larger while the processing time becomes three times larger.
Furthermore, as the means for expanding a search region, there is a method of predicting a motion vector detection position and searching for the periphery of the prediction region like FIG. 22. In the case where a prediction position is wrong, there is the possibility that wrong detection of a motion vector becomes high.
Furthermore, in order to efficiently detect a motion vector without decreasing detection accuracy, a technology of filtering a video signal in interlace fashion using a characteristic such that the horizontal direction is stronger than the vertical direction is disclosed (patent article 2). In this method, detection is effectively performed by extracting the characteristic amounts in a standard block and a candidate block to be computed and by decreasing the number of sample pixels in one MB to be estimation-computed. Therefore, the conventional methods are the same as the present invention in the pursuit of the efficiency of motion vector detection. However, the way of solving the problem is fairly different since the present invention concentrates on the improvement of a method of expanding a search region.
[Patent article 1] Japanese laid-open patent publication No. 10-42,298 (pages 5 and 6, FIG. 1)
[Patent article 2] Japanese laid-open patent publication No. 07-212,764 (page 3, FIG. 1)
In the case where the movement search region of a motion vector is expanded as mentioned above, the scale and the consumption of electric power of a circuit increase as a computation processing amount increases. In the case where a prediction position is simply restricted and vector detection is performed, there arises a problem in the accuracy of detection results.
The present invention aims at providing a method, an apparatus and a program of motion vector detection for enabling vector detection with high accuracy by determining the search region of a motion vector on the basis of the analysis of a statistics amount of the previously obtained motion vector and by performing a vector search in a wide area while controlling the expansion of a computation amount and a circuit scale.
The present invention aims at providing a prediction coding device using a motion vector detection apparatus that can perform highly accurate vector detection in a wide region while controlling the expansion of a computation amount and a circuit scale by appropriately expanding the search region of a motion vector.